package com.lantosec.hmrp.modules.category.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.category.vo.AssetsAccessAntennaVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * <p>
 * 门禁设备天线定义 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-04-15
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AssetsAccessAntenna extends BaseEntity<AssetsAccessAntennaVO> {

    private static final long serialVersionUID = 1L;
    public AssetsAccessAntenna(AssetsAccessAntennaVO vo){
        this.antennaId = vo.getAntennaId();
        this.antennaName = vo.getAntennaName();
        this.antennaNo = vo.getAntennaNo();
        this.accessId = vo.getAccessId();
        this.flag = vo.getFlag();
    }

    @Override
    public AssetsAccessAntennaVO convertToVO(){
        return new AssetsAccessAntennaVO(this);
    }


    /**
     * 门禁设备天线ID
     */
    @TableId(value = "antenna_id", type = IdType.ASSIGN_UUID)
    private String antennaId;

    /**
     * 门禁设备天线名称
     */
    private String antennaName;

    /**
     * 天线序号
     */
    private Integer antennaNo;

    /**
     * 门禁设备ID
     */
    private String accessId;

    @TableField(exist = false)
    private Integer flag;


    public enum ColName {
        antenna_id, antenna_name, antenna_no, access_id, 
    }
}
